<?php

namespace appcode\enum;

require_once("IEnumBaseClass.php");

class AddressType implements IEnumBaseClass {
    const Email = "email";
    const Phone = "phone";
    const Country = "country";
    const Address = "address";
    const Zip = "zip";

    public static function GetArray() {
        return array(1 => self::Email, 2 => self::Phone, 3 => self::Country, 4 => self::Address, 5 => self::Zip);
    }

    public static function GetById($id){
        return EnumBaseClassHelper::GetById(self::GetArray(), $id);
    }

    public static function GetByName($name) {
        return EnumBaseClassHelper::GetByName(self::GetArray(), $name);
    }

    public static function GetDefaultId() {
        return EnumBaseClassHelper::GetDefaultId(self::GetArray(), self::GetDefaultName());
    }

    public static function GetDefaultName() {
        return self::Email;
    }
}